package demo20241015;

import java.util.Scanner;

public class Text {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            float weight = in.nextFloat();
            String isHurry = in.nextLine().trim();
//            char isHurry1 = ‘y’;
            System.out.println(isHurry);
            int money = 0;
            if(weight <= 1.0f){
                money += 20;
            }else{
                money += 20;
                float overWeight = weight - 1.0f;
                int intOerWeight = (int)overWeight;
                if((float)intOerWeight == overWeight){
                    money += 1;
                }else{
                    money += 2;
                }
            }
            if(isHurry == "y"){
                money += 5;

            }
            System.out.println(money);

        }
    }
}
